class Admin::WebsiteUserController < Admin::AbstractModelController
  
  model_class WebsiteUser
  
  def index
    self.models = model_class.find(:all, :order => "name")
  end
  
  def new_password
    @website_user = WebsiteUser.find(params[:id])
    
    if @website_user.nil?
      redirect_to website_user_index_url
      return
    end
    
    @website_user.new_random_password
    flash[:notice] = "New password sent"[:new_password_sent]
    redirect_to website_user_edit_url(@website_user)
  end
  
end